import { services } from '@/config'

export const tableOption = {
  border: true,
  // index: true,
  expand: true,
  rowKey: 'id',
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  // 列宽
  labelWidth: 130,
  searchMenuSpan: 6,
  searchLabelWidth: 100,
  searchShow: false,
  viewBtn: true,
  menuWidth: 260,
  column: [
    {
      type: 'select',
      label: '人员类别',
      formslot: true,
      search: true,
      prop: 'personnelType',
      span: 12,
      props: { label: 'label', value: 'value' },
      dicUrl: `${services.adminService}dict/type/personnel_type`,
      width: 100,
      dicMethod: 'get',
      rules: [
        {
          message: '请选择人员',
          required: true
        }
      ]
    },
    {
      type: 'input',
      label: '单位名称',
      prop: 'entityName',
      formslot: true,
      search: true,
      width: 200,
      span: 12,
      rules: [
        {
          message: '请填写单位名称',
          required: true
        }
      ]
    },
    {
      type: 'input',
      label: '身份证号',
      formslot: true,
      search: true,
      width: 200,
      prop: 'idNumber',
      span: 12,
      rules: [
        {
          message: '请填写身份证',
          required: true
        }
      ]
    },
    {
      type: 'input',
      label: '持证人姓名',
      prop: 'holderName',
      search: true,
      span: 12,
      formslot: true,
      width: 100,
      rules: [
        {
          message: '请填写持证人姓名',
          required: true
        }
      ]
    },
    {
      type: 'input',
      label: '证件编号',
      width: 200,
      search: true,
      prop: 'certificateNo',
      span: 12,
      rules: [
        {
          message: '请填写证件编号',
          required: true
        }
      ]
    },
    {
      type: 'select',
      label: '证件类型',
      prop: 'certifiCate',
      search: true,
      span: 12,
      props: { label: 'label', value: 'value' },
      dicUrl: `${services.adminService}dict/type/certifi_category`,
      dicMethod: 'get',
      rules: [
        {
          message: '请选择证件类型',
          required: true
        }
      ]
    },
    {
      type: 'input',
      label: '证件名称',
      prop: 'cerifiName',
      search: true,
      width: 150,
      span: 12,
      rules: [
        {
          message: '请填写证件名称',
          required: true
        }
      ]
    },
    {
      type: 'input',
      label: '证件印刷号',
      prop: 'cerifiPrintNum',
      width: 200,
      span: 12
    },
    {
      type: 'input',
      label: '证件签发机关',
      search: true,
      prop: 'cerifiIssueAuthority',
      span: 12,
      display: true,
      width: 150
    },
    {
      type: 'date',
      label: '证件签发日期',
      prop: 'cerifiIssueDate',
      span: 12,
      search: true,
      display: true,
      format: 'yyyy-MM-dd',
      width: 100,
      valueFormat: 'yyyy-MM-dd',
      searchSpan: 12,
      searchRange: true
    },
    {
      type: 'date',
      label: '证件有效日期',
      prop: 'cerifiValidityDate',
      search: true,
      span: 12,
      display: true,
      format: 'yyyy-MM-dd',
      width: 100,
      valueFormat: 'yyyy-MM-dd',
      searchSpan: 12,
      searchRange: true
    },
    {
      label: '附件信息',
      prop: 'uploadPage',
      type: 'input',
      formslot: true,
      slot: true,
      span: 24,
      hide: true
    }
  ]
}
